/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package Actors;
 
/**
 *
 * @author anc
 */
public class Ball extends Actor {

    public Ball(String name, String filename, int size) {
        super(name, filename, size);
         
    }
    
    private int width;
    private int height;

    @Override
    public void timeTick() {
        
        super.timeTick();

        
        doSpecialMovementStrategy();

    }

    private void doSpecialMovementStrategy() {
        
        if (atHorizontalEdge()) {
            setSpeedX(-getSpeedX());
        }
        if (atVerticalEdge()) {
            setSpeedY(-getSpeedY());
        }
    }
    
    

    public int getBallWidth() {
        return width;
    }

    public void setBallWidth(int width) {
        this.width = width;

    }

    public int getBallHeight() {
        return height;
    }

    public void setBallHeight(int height) {
        this.height = height;
    }

    public boolean collidesWith() {
        throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
    }

}
